function formatCurrency(strings, ...values) {
    console.log(strings, ...values);
    let result = "";
    values.forEach((value, index) => {
        result += `${strings[index]}${value}`;
    });
    result += strings[strings.length - 1];
    return result;
}

const price = 19.99;
const discount = 0.2;

// const formattedPrice = formatCurrency`Price: ${price} (20%)`;
const formattedPrice = formatCurrency`
<div>
    ${price}
    <div>
        ${price}
    </div>
    <div>
        ${discount}
    </div>
</div>
`;

console.log(formattedPrice); // 输出 "Price: 19.99 (20%)"